package org.yylnb.openplatform.gateway.utils;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 本地缓存工具类
 *
 * @author RainLin
 * @date 2020/7/25 - 19:40
 */
public class LocalCacheUtils {

    private static Map<String, Map<String, String>> ApiRoutingMap = new ConcurrentHashMap<>();

    public static void addMapping(String key, Map<String, String> value) {

        ApiRoutingMap.put(key, value);
    }


    public static Map<String, Map<String, String>> getApiRoutingMap() {
        return ApiRoutingMap;
    }

    public static Map<String, String> getMapping(String key) {
        return ApiRoutingMap.get(key);
    }

    public static void deleteMapping(String key) {
        ApiRoutingMap.remove(key);
    }


}

